package com.sinotopia.springboot.controller;

import java.util.Date;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;

@RestController
public class HelloController {

    @RequestMapping("/")
    public String index() {
        return "Greetings from Spring Boot!";
    }
    
    @RequestMapping("/hello")
    String home() {
        return "Hello World!";
    }
    
    @RequestMapping("/now")
    String now() {
        return "现在时间：" + (new Date()).toLocaleString();
    }

}